package com.wbw.init;

import org.springframework.context.annotation.Primary;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(2)
@Primary //按类型注入Job的时候，防止冲突，优先注入Job1
public class Job1 extends Job {
    public Job1(){
        System.out.println("Job1实例化完成");
    }

    @Override
    public void doJob() {
        System.out.println("Job1中的doJob");
    }
}
